package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TransferStockOutMapper;
import com.ruoyi.system.domain.TransferStockOut;
import com.ruoyi.system.service.ITransferStockOutService;

/**
 * 调拨出库 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-01
 */
@Service
public class TransferStockOutServiceImpl implements ITransferStockOutService
{
    @Autowired
    private TransferStockOutMapper transferStockOutMapper;

    /**
     * 通过id查询调拨出库
     *
     * @param id 调拨出库主键
     * @return 调拨出库
     */
    @Override
    public TransferStockOut selectTransferStockOutById(Long id)
    {
        return transferStockOutMapper.selectTransferStockOutById(id);
    }

    /**
     * 通过调出仓库名称和调入仓库名称查询调拨出库列表
     *
     * @param outWarehouseName,inWarehouseName 调出仓库名称，调入仓库名称
     * @return 调拨出库
     */
    @Override
    public List<TransferStockOut> selectTransferStockOutListByName(String outWarehouseName,String inWarehouseName)
    {
        return transferStockOutMapper.selectTransferStockOutListByName(outWarehouseName,inWarehouseName);
    }

    /**
     * 新增调拨出库
     *
     * @param transferStockOut 调拨出库
     * @return 结果
     */
    @Override
    public int insertTransferStockOut(TransferStockOut transferStockOut)
    {
        return transferStockOutMapper.insertTransferStockOut(transferStockOut);
    }

    /**
     * 修改调拨出库
     *
     * @param transferStockOut 调拨出库
     * @return 结果
     */
    @Override
    public int updateTransferStockOut(TransferStockOut transferStockOut)
    {
        return transferStockOutMapper.updateTransferStockOut(transferStockOut);
    }

    /**
     * 通过id批量删除调拨出库信息
     *
     * @param ids 需要删除的调拨出库主键
     * @return 结果
     */
    @Override
    public int deleteTransferStockOutByIds(Long[] ids)
    {
        return transferStockOutMapper.deleteTransferStockOutByIds(ids);
    }

    /**
     * 通过id删除调拨出库信息
     *
     * @param id 调拨出库主键
     * @return 结果
     */
    @Override
    public int deleteTransferStockOutById(Long id)
    {
        return transferStockOutMapper.deleteTransferStockOutById(id);
    }
}
